Public Class RichTextBoxDemo

    Private Sub RichTextBoxDemo_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim FileDB As New OpenFileDialog()

        FileDB.Filter = "All files|*.*|RTF files|*.rtf"
        FileDB.FilterIndex = 2
        FileDB.InitialDirectory = "C:\Documents"

        If (FileDB.ShowDialog() = Windows.Forms.DialogResult.OK) Then
            Try

                RichTextBox1.LoadFile(FileDB.FileName)
            Catch Ex As Exception
                MsgBox(Ex.Message)
            End Try
        End If

    End Sub
End Class
